﻿using System;
using System.Data;
using KPIS.GERP.SECURITY.DAL;

namespace KPIS.GERP.SECURITY.BLL
{
    public class PermissionBLL
    {
        private PermissionDAL DAL = new PermissionDAL();

        public PermissionBLL()
        {

        }
        public DataTable LoadPermission(Nullable<int> Sequence, Nullable<int> Role)
        {
            return DAL.LoadPermission(Sequence, Role);
        }
        public void Insert(int RoleSequence, int MenuSequence, string PermissionType, int CreatedBy)
        {
            try
            {
                DAL.Insert(RoleSequence, MenuSequence, PermissionType, CreatedBy);
            }
            catch
            {
                throw;
            }
        }
        public void Update(int Sequence, int RoleSequence, int MenuSequence, string PermissionType, int UpdatedBy)
        {
            try
            {
                DAL.Update(Sequence, RoleSequence, MenuSequence, PermissionType, UpdatedBy);
            }
            catch
            {
                throw;
            }
        }
        public void Delete(int Sequence, int UpdatedBy)
        {
            try
            {
                DAL.Delete(Sequence, UpdatedBy);
            }
            catch
            {
                throw;
            }
        }
    }
}
